{$sValMess}
{messages}
<form method="post" action="{url link='current'}" name="cpform" id="cpform" onsubmit="{$sValJs}">
{if $sTranslate}
<div><input type="hidden" name="val[varname]" value="{if $sTranslate}{$sTranslate|escape|parse}{else}{$aItem.varname|escape}{/if}" size="40" /></div>
<div><input type="hidden" name="val[module]" value="Mod_Language" size="40" /></div>
{/if}
<table style="width:100%;" class="forumline" cellspacing="0">
<tr>
	<td class="row-header" colspan="2"><span>{language text="Mod_Language.adding_new_phrase"}</span></td>
</tr>
{if $sError}
<tr>
	<td class="catBottom" colspan="2" style="font-size:10pt;">
	{$sError}
	</td>
</tr>
{/if}
{if $sTranslate}
<tr>
	<td class="row1" style="text-align:right;">
		{language text='Mod_Language.language'}:
	</td>
	<td class="row1">
		<select name="id">
		{foreach from=$aLanguages item=aLanguage}
			<option value="{$aLanguage.id}"{if $aPost.id == $aLanguage.id} selected="selected="{/if}>{$aLanguage.title}</option>
		{/foreach}
		</select>
	</td>
</tr>
{/if}
{if !$sTranslate}
<tr>
	<td class="row1" style="text-align:right;">
		{language text="Mod_Language.module"}:
	</td>
	<td class="row1">
		<select name="val[module]">
		<option value="">{language text="Mod_Language.global"}</option>
		{foreach from=$aModules item=aModule}
			<option value="{$aModule}"{if $aPost.module == $aModule} selected="selected="{/if}>{$aModule}</option>
		{/foreach}
		</select>
	</td>
</tr>
<tr>
	<td class="row1" style="text-align:right;">
		{language text="Mod_Language.varname"}:
	</td>
	<td class="row1">
		<input type="text" name="val[varname]" value="{$aItem.varname|escape}" size="40" />
	</td>
</tr>
{/if}
<tr>
	<td class="row1" style="text-align:right; vertical-align:top;">
		{language text='Mod_Language.text'}:
	</td>
	<td class="row1">
		{if !$sTranslate}
		{foreach from=$aLanguages item=aLanguage}
			<div style="margin-bottom:10px;">
			<div><b>{$aLanguage.title}</b></div>
			<div style="padding:5px;">
				<textarea cols="60" rows="8" name="val[text][{$aLanguage.id}]">{if $sTranslate}{$sTranslate|escape}{else}{$aItem.text|escape}{/if}</textarea>
			</div>
			</div>
		{/foreach}
		{else}
			<textarea cols="60" rows="8" name="val[text]">{if $sTranslate}{$sTranslate|escape}{else}{$aItem.text|escape}{/if}</textarea>
		{/if}
	</td>
</tr>
<tr>
	<td class="catBottom" colspan="2" style="text-align:center;">
	<input type="submit" name="save" value="{language text='Mod_Language.save'}" />
	</td>
</tr>
</table>
</form>